package com.tenton.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;

/**
 * @Date: 2021/1/18
 * @Author: Tenton
 * @Description:
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ShoppingCart {
  /**
   * 购物车Id
   */
  private Integer id;
  /**
   * 用户Id
   */
  private Integer userId;
  /**
   * 图书Id
   */
  private Integer bookId;
  /**
   * 图书名称
   */
  private String bookName;
  /**
   * 图书单价
   */
  private BigDecimal price;
  /**
   * 购买数量
   */
  private Integer num;
  /**
   * 总价
   */
  private BigDecimal totalPrice;

  public ShoppingCart(Integer userId, Integer bookId, String bookName, BigDecimal price, Integer num, BigDecimal totalPrice) {
    this.userId = userId;
    this.bookId = bookId;
    this.bookName = bookName;
    this.price = price;
    this.num = num;
    this.totalPrice = totalPrice;
  }
}
